﻿@model Parichay.Domain.Models.UserHomeModel

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section Styles {
<link href="@Url.Content("~/Content/Styles/jquery.ui.css")" rel="stylesheet" type="text/css" />
}
@section Scripts
{
<script src="@Url.Content("~/Content/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function ($) {

        $('DIV.modalWin').dialog({ autoOpen: false }); // or hide in css
        //$('DIV.modalWin').modal();


        $('a.openModal').click(function () {
            var divNm = '#' + $(this).attr('data-name');
            $(divNm).dialog('open');
        });

        $('DIV.rplyBox').toggle('slow');

        $('a.showreply').click(function () {
            var divNm = '#' + $(this).attr('data-name');
            $(divNm).toggle('slow');
        });
    });
</script>
}
<h2>Index</h2>

<fieldset>
    <legend>Member Details</legend>
    <div style="clear:left;float:left;width:164px;">
    <table class="tblAllBorders">
    @if (Model.IsCurrentUser)
    {
    <tr><td>@Html.ActionLink("Edit Personal Info.", "Edit") | @Html.ActionLink("About Yourself", "BioData")
    </td></tr>}
    <tr>
    <td>
        @if (Model.myInfo != null)
    {
        @Html.Partial("BO/usrProf",Model.myInfo)
    }
    else
    {
        <p>Your profile is empty</p>
    }
    </td>
    </tr>
    @if(Model.IsCurrentUser){
    <tr><td>@Html.ActionLink("Change Password", "ChangePassword") | @Html.ActionLink("Password Ques. & Ans.", "ChangePassQnA")</td></tr>
    }</table>
    </div>
    <div style="float:right;width:500px;">
    @if ((Model.myAlerts != null) && (Model.myAlerts.Count != 0))
    {<br />
        @Html.Partial("BO/MyAlerts",Model.myAlerts)
    }
    @if ((Model.myPosts != null) && (Model.myPosts.Count != 0))
    {<br />
            <div class="cmtMainBox">
     <div class="cmtHeading"><span>(@Html.ActionLink("My Posts", "Index", "Post")):</span></div>
        @foreach (var itm in Model.myPosts)
         {
             @Html.Partial("BO/post",itm)
         }
         </div>
    }
    @if ((Model.myFriendPosts != null) && (Model.myFriendPosts.Count != 0))
    {<br /><br />
            <div class="cmtMainBox">
            <div class="cmtHeading"><span>Friend's Posts (@Html.ActionLink("My Friends", "Index", "Friend")):</span></div>
          @foreach (var itm in Model.myFriendPosts)
         {
             @Html.Partial("BO/post", itm)
         }
         </div>
    }
    @if ((Model.myMessages != null) && (Model.myMessages.Count != 0))
    {<br />
            <div class="cmtMainBox">
     <div class="cmtHeading"><span>(@Html.ActionLink("My Messages", "Index", "Message")):</span></div>
        @foreach (var itm in Model.myMessages)
         {
             @Html.Partial("BO/msg",itm)
         }
         </div>
    }
    @if ((Model.myFriendMsg != null) && (Model.myFriendMsg.Count != 0))
    {<br /><br />
            <div class="cmtMainBox">
            <div class="cmtHeading"><span>Friend's Messages (@Html.ActionLink("My Friends", "Index", "Friend")):</span></div>
          @foreach (var itm in Model.myFriendMsg)
         {
             @Html.Partial("BO/msg", itm)
         }
         </div>
    }
    @if ((Model.myRequests != null) && (Model.myRequests.Count != 0))
    {<br />
        @Html.Partial("BO/MyRequests",Model.myRequests)
    }
    @if ((Model.myInvites != null) && (Model.myInvites.Count != 0))
    {<br />
        @Html.Partial("BO/MyInvites",Model.myInvites)
    }
    </div>
    
  
</fieldset>
<p>
    
</p>
